package com.dao;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.domain.Staff;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author huly
 * @since 2024-04-07
 */
@DS("sit")
public interface StaffMapper extends BaseMapper<Staff> {

    @Select("select * from staff where username = #{username}")
    List<Staff> getUserByName(String username);

    @Select("select * from department join staff where department.departmentno = staff.departmentno ")
    List<Map<String, Object>> getUserAll();



}
